package com.haoze.nurse.controller;

import com.haoze.common.response.Result;
import com.haoze.common.response.ResultGenerator;
import com.haoze.nurse.dto.lab.LabSpecimenSearchDto;
import com.haoze.nurse.service.FileIndexService;
import com.haoze.nurse.service.PatientOrderService;
import com.haoze.nurse.service.TaskBatchService;
import com.haoze.nurse.service.TransfusionService;
import com.haoze.nurse.vo.Commodel;
import com.haoze.nurse.vo.DoctorAdvicesVO;
import io.swagger.annotations.*;
import org.apache.commons.lang3.StringUtils;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;


/**
 * 2020.07.03
 *
 * @author xmd
 */
@RestController
@RequestMapping(value = "/nurse/taskBatch")
@Api(value = "任务流执行")
public class TaskBatchController {

    @Resource
    TaskBatchService taskBatchService;

    @Resource
    TransfusionService transfusionService;



    @GetMapping("/infusionCenterList")
    @ApiOperation("输液中心-获取穿刺通道信息")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "qrCode", value = "", dataType = "string", example = "", defaultValue = "")
    })
    public Result infusionCenterList(@RequestParam String qrCode) {
        return ResultGenerator.genOkResult(transfusionService.infusionCenterList(qrCode));
    }



    @GetMapping("/infusionCenterListByInpatNum")
    @ApiOperation("输液中心-通过住院号获取穿刺通道信息")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "inpatNum",value = "住院号",dataType = "String",example = "1143026-1",defaultValue = "")
    })
    public Result queryInfusionCenterListByInpatNum(@RequestParam String inpatNum){
        return taskBatchService.queryInfusionCenterList(inpatNum);
    }
}
